import logger = require('./hooks/logger');
import record_time = require('./hooks/record_time');
const auth = require('feathers-authentication')
const { remove, discard } = require('feathers-hooks-common');

//不作处理的service
const skipServices = [
    'authentication',
]
//不用jwt验证的service
const noAuthServices = [
    'database/buyer',
]

export = {
    before: {
        all: [
            (hook: any) => {

            }
        ],
        find: [],
        get: [],
        create: [record_time()],
        update: [record_time()],
        patch: [],
        remove: []
    },

    after: {
        all: [
            logger(), 
            discard('dataValues.password_md5'),
        ],
        find: [],
        get: [],
        create: [],
        update: [],
        patch: [],
        remove: []
    },

    error: {
        all: [
            logger()
        ],
        find: [],
        get: [],
        create: [],
        update: [],
        patch: [],
        remove: []
    }
};
